🌱 Upgrade to Go 1.25.0#1296
🌱 Upgrade to Go 1.25.0#1296openshift-merge-bot[bot] merged 1 commit intoopen-cluster-management-io:mainfrom
Conversation
WalkthroughThis pull request upgrades Go from version 1.24 to 1.25 across the project. Changes include updating GO_VERSION environment variables in GitHub workflows, updating Dockerfile base images from golang:1.24-bullseye to golang:1.25-bookworm, bumping the go toolchain in go.mod to 1.25.0, updating three Open Cluster Management module dependencies to newer versions, refreshing documentation version references, and updating ClusterServiceVersion timestamps. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (13)
🚧 Files skipped from review as they are similar to previous changes (10)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/post.yml (1)
16-16: Go version updated correctly; verify actions/setup-go handles minor-only version.The GO_VERSION environment variable is properly updated to '1.25' and correctly used in both the coverage and images jobs. Verify that the minor-only version string (without patch) correctly resolves to the latest Go 1.25.x patch version in the actions/setup-go@v6 action.
Additionally, note that GO_REQUIRED_MIN_VERSION on line 17 is empty. If minimum version enforcement is desired (e.g., to catch accidental downgrades in CI runs), consider setting it to '1.25' to match the primary GO_VERSION.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
build/Dockerfile.workis excluded by!**/*.work
📒 Files selected for processing (11)
.github/workflows/cloudevents-integration.yml(1 hunks).github/workflows/e2e.yml(1 hunks).github/workflows/post.yml(1 hunks).github/workflows/pre.yml(1 hunks).github/workflows/releaseimage.yml(1 hunks)build/Dockerfile.addon(1 hunks)build/Dockerfile.placement(1 hunks)build/Dockerfile.registration(1 hunks)build/Dockerfile.registration-operator(1 hunks)development.md(2 hunks)go.mod(1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-07-02T05:42:41.749Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1058
File: pkg/server/services/work/work.go:39-49
Timestamp: 2025-07-02T05:42:41.749Z
Learning: In the OCM (Open Cluster Management) codebase, nil checks with panic statements in constructor functions for interface parameters are considered unnecessary, as the dependency injection/wiring is managed properly and such checks are not part of the established codebase patterns.
Applied to files:
go.mod
📚 Learning: 2025-06-26T00:34:09.815Z
Learnt from: zhiweiyin318
Repo: open-cluster-management-io/ocm PR: 1046
File: manifests/cluster-manager/hub/cluster-manager-clusterprofiles-clusterrole.yaml:5-10
Timestamp: 2025-06-26T00:34:09.815Z
Learning: The open-cluster-management-io/ocm codebase uses Go templates (text/template), not Helm templates. The standard pattern for dynamic labels in manifests is: `{{ if gt (len .Labels) 0 }}{{ range $key, $value := .Labels }}"{{ $key }}": "{{ $value }}"{{ end }}{{ end }}`. Do not suggest Helm-specific functions like `toYaml` for this codebase.
Applied to files:
go.mod
📚 Learning: 2025-07-23T10:10:42.066Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1086
File: test/integration/util/grpc.go:146-146
Timestamp: 2025-07-23T10:10:42.066Z
Learning: In OCM codebase, there are two different GRPCServerOptions types: the local one in pkg/server/grpc/options.go (which only has GRPCServerConfig field) and the SDK one from open-cluster-management.io/sdk-go/pkg/cloudevents/server/grpc/options (which has ServerBindPort and other fields with default values). Test code uses the SDK version via grpcoptions import alias.
Applied to files:
go.mod
📚 Learning: 2025-06-26T00:33:09.311Z
Learnt from: zhiweiyin318
Repo: open-cluster-management-io/ocm PR: 1046
File: manifests/cluster-manager/hub/cluster-manager-clusterprofiles-clusterrolebinding.yaml:5-10
Timestamp: 2025-06-26T00:33:09.311Z
Learning: The OCM (Open Cluster Management) project uses Go templates for Kubernetes manifest generation, not Helm templates. Functions like `toYaml` that are available in Helm are not available in Go templates. The correct Go template syntax for iterating over labels is `{{ range $key, $value := .Labels }}` followed by `"{{ $key }}": "{{ $value }}"`.
Applied to files:
go.mod
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: verify PR contents
- GitHub Check: unit
- GitHub Check: verify
- GitHub Check: integration
- GitHub Check: build
🔇 Additional comments (10)
build/Dockerfile.registration-operator (1)
1-1: Base image version updated correctly.The builder stage base image is upgraded from golang:1.24-bullseye to golang:1.25-bullseye. The change is isolated to the base image layer; all subsequent build steps remain unchanged and correct.
build/Dockerfile.placement (1)
1-1: Base image version updated correctly.The builder stage base image is upgraded to golang:1.25-bullseye. The change is consistent with the registration-operator Dockerfile update and does not affect the build logic or final runtime configuration.
development.md (1)
29-29: Documentation version references updated consistently.Both occurrences of the Go version in the development guide (line 29 in Key Technologies and line 39 in Prerequisites) are updated from 1.24.0 to 1.25.0, aligning with the module directive and CI/CD workflow changes.
Also applies to: 39-39
.github/workflows/e2e.yml (1)
18-18: GO_VERSION environment variable updated correctly.The environment variable is updated to 1.25 and is correctly referenced across all three E2E test job definitions (lines 37, 75, 113). The use of a centralized environment variable ensures consistency across the workflow.
.github/workflows/releaseimage.yml (1)
9-9: GO_VERSION environment variable updated for release workflow.The version is updated to 1.25 and is correctly referenced in the setup-go action (lines 58-60) for both the images and image-manifest jobs. The centralized environment variable definition ensures consistency across the release pipeline.
go.mod (1)
3-3: Module Go directive updated to 1.25.0.The go directive is correctly updated from 1.24.0 to 1.25.0. This sets the minimum Go version requirement for the module. All dependencies remain unchanged, which aligns with the scope of this version upgrade.
Verify that all current dependencies in go.mod are compatible with Go 1.25.0. You can run
go mod tidy && go build ./cmd/...locally to ensure there are no compatibility issues with the new Go version..github/workflows/pre.yml (1)
16-16: GO_VERSION environment variable updated consistently.The version is updated to 1.25 and is correctly referenced across all four jobs (verify, build, unit, integration) at lines 32, 49, 62, and 84. The centralized environment variable ensures consistency across all pre-merge checks.
.github/workflows/cloudevents-integration.yml (1)
15-15: GO_VERSION environment variable updated for CloudEvents integration.The version is updated to 1.25 and is correctly referenced in both integration test jobs (lines 31 and 44). The update aligns with the rest of the CI/CD infrastructure.
build/Dockerfile.registration (1)
1-1: Verify golang:1.25-bullseye image availability and stability.The builder image has been correctly updated to Go 1.25. Ensure the
golang:1.25-bullseyeimage is available on Docker Hub and suitable for the build process, especially when building for both amd64 and arm64 architectures (as seen in the CI workflows).build/Dockerfile.addon (1)
1-1: Go builder image updated consistently; verify availability.The builder image is correctly updated to Go 1.25 in line with the changes across all Dockerfiles (registration, registration-operator, placement, work) in this PR. Confirm that
golang:1.25-bullseyeis available on Docker Hub and functional for both amd64 and arm64 architectures.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1296 +/- ##
==========================================
- Coverage 62.23% 62.22% -0.02%
==========================================
Files 209 209
Lines 17052 17052
==========================================
- Hits 10613 10611 -2
- Misses 5319 5320 +1
- Partials 1120 1121 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@haoqing0110 api/sdk-go/addon-framework would also need to be upgraded... |
ff1c1db to
1e7739d
Compare
|
/hold |
1e7739d to
bbb5ced
Compare
|
/unhold |
bbb5ced to
33ee14a
Compare
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Qing Hao <qhao@redhat.com>
33ee14a to
950b751
Compare
|
/assign @qiujian16 |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haoqing0110, qiujian16 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
f01915a
into
open-cluster-management-io:main
Summary
Upgrade Go version from 1.24.0 to 1.25.0 across the entire codebase.
Changes
This PR updates the Go version to 1.25.0 in the following locations:
GitHub Actions Workflows (5 files)
.github/workflows/cloudevents-integration.yml.github/workflows/e2e.yml.github/workflows/post.yml.github/workflows/pre.yml.github/workflows/releaseimage.ymlDockerfiles (5 files)
build/Dockerfile.addonbuild/Dockerfile.placementbuild/Dockerfile.registrationbuild/Dockerfile.registration-operatorbuild/Dockerfile.workGo Module
go.mod- Updated Go directive from1.24.0to1.25.0Documentation
development.md- Updated prerequisite and technology referencesRelated Issues
Part of the ongoing effort to keep OCM dependencies up to date.
🤖 Generated with Claude Code
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.